/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.sisportaria.bean;

import java.beans.PropertyChangeListener;
import java.beans.PropertyChangeSupport;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 *
 * @author lac
 */
@Entity
@Table(name = "INFRACAO")
@NamedQueries({@NamedQuery(name = "Infracao.findAll", query = "SELECT i FROM Infracao i"), @NamedQuery(name = "Infracao.findByIfncodg", query = "SELECT i FROM Infracao i WHERE i.ifncodg = :ifncodg"), @NamedQuery(name = "Infracao.findByPsncodg", query = "SELECT i FROM Infracao i WHERE i.psncodg = :psncodg"), @NamedQuery(name = "Infracao.findByVtncodg", query = "SELECT i FROM Infracao i WHERE i.vtncodg = :vtncodg"), @NamedQuery(name = "Infracao.findByIfdocor", query = "SELECT i FROM Infracao i WHERE i.ifdocor = :ifdocor"), @NamedQuery(name = "Infracao.findByIfclocl", query = "SELECT i FROM Infracao i WHERE i.ifclocl = :ifclocl"), @NamedQuery(name = "Infracao.findByIfcdesc", query = "SELECT i FROM Infracao i WHERE i.ifcdesc = :ifcdesc"), @NamedQuery(name = "Infracao.findByIfdvenc", query = "SELECT i FROM Infracao i WHERE i.ifdvenc = :ifdvenc"), @NamedQuery(name = "Infracao.findByIfyvalr", query = "SELECT i FROM Infracao i WHERE i.ifyvalr = :ifyvalr"), @NamedQuery(name = "Infracao.findByIfctipo", query = "SELECT i FROM Infracao i WHERE i.ifctipo = :ifctipo"), @NamedQuery(name = "Infracao.findByIfdpagt", query = "SELECT i FROM Infracao i WHERE i.ifdpagt = :ifdpagt")})
public class Infracao implements Serializable {
    @Transient
    private PropertyChangeSupport changeSupport = new PropertyChangeSupport(this);
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "IFNCODG")
    private Integer ifncodg;
    @Column(name = "PSNCODG")
    private Integer psncodg;
    @Column(name = "VTNCODG")
    private Integer vtncodg;
    @Column(name = "IFDOCOR")
    @Temporal(TemporalType.DATE)
    private Date ifdocor;
    @Column(name = "IFCLOCL")
    private String ifclocl;
    @Column(name = "IFCDESC")
    private String ifcdesc;
    @Column(name = "IFDVENC")
    @Temporal(TemporalType.DATE)
    private Date ifdvenc;
    @Column(name = "IFYVALR")
    private Double ifyvalr;
    @Column(name = "IFCTIPO")
    private String ifctipo;
    @Column(name = "IFDPAGT")
    @Temporal(TemporalType.DATE)
    private Date ifdpagt;

    public Infracao() {
    }

    public Infracao(Integer ifncodg) {
        this.ifncodg = ifncodg;
    }

    public Integer getIfncodg() {
        return ifncodg;
    }

    public void setIfncodg(Integer ifncodg) {
        Integer oldIfncodg = this.ifncodg;
        this.ifncodg = ifncodg;
        changeSupport.firePropertyChange("ifncodg", oldIfncodg, ifncodg);
    }

    public Integer getPsncodg() {
        return psncodg;
    }

    public void setPsncodg(Integer psncodg) {
        Integer oldPsncodg = this.psncodg;
        this.psncodg = psncodg;
        changeSupport.firePropertyChange("psncodg", oldPsncodg, psncodg);
    }

    public Integer getVtncodg() {
        return vtncodg;
    }

    public void setVtncodg(Integer vtncodg) {
        Integer oldVtncodg = this.vtncodg;
        this.vtncodg = vtncodg;
        changeSupport.firePropertyChange("vtncodg", oldVtncodg, vtncodg);
    }

    public Date getIfdocor() {
        return ifdocor;
    }

    public void setIfdocor(Date ifdocor) {
        Date oldIfdocor = this.ifdocor;
        this.ifdocor = ifdocor;
        changeSupport.firePropertyChange("ifdocor", oldIfdocor, ifdocor);
    }

    public String getIfclocl() {
        return ifclocl;
    }

    public void setIfclocl(String ifclocl) {
        String oldIfclocl = this.ifclocl;
        this.ifclocl = ifclocl;
        changeSupport.firePropertyChange("ifclocl", oldIfclocl, ifclocl);
    }

    public String getIfcdesc() {
        return ifcdesc;
    }

    public void setIfcdesc(String ifcdesc) {
        String oldIfcdesc = this.ifcdesc;
        this.ifcdesc = ifcdesc;
        changeSupport.firePropertyChange("ifcdesc", oldIfcdesc, ifcdesc);
    }

    public Date getIfdvenc() {
        return ifdvenc;
    }

    public void setIfdvenc(Date ifdvenc) {
        Date oldIfdvenc = this.ifdvenc;
        this.ifdvenc = ifdvenc;
        changeSupport.firePropertyChange("ifdvenc", oldIfdvenc, ifdvenc);
    }

    public Double getIfyvalr() {
        return ifyvalr;
    }

    public void setIfyvalr(Double ifyvalr) {
        Double oldIfyvalr = this.ifyvalr;
        this.ifyvalr = ifyvalr;
        changeSupport.firePropertyChange("ifyvalr", oldIfyvalr, ifyvalr);
    }

    public String getIfctipo() {
        return ifctipo;
    }

    public void setIfctipo(String ifctipo) {
        String oldIfctipo = this.ifctipo;
        this.ifctipo = ifctipo;
        changeSupport.firePropertyChange("ifctipo", oldIfctipo, ifctipo);
    }

    public Date getIfdpagt() {
        return ifdpagt;
    }

    public void setIfdpagt(Date ifdpagt) {
        Date oldIfdpagt = this.ifdpagt;
        this.ifdpagt = ifdpagt;
        changeSupport.firePropertyChange("ifdpagt", oldIfdpagt, ifdpagt);
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ifncodg != null ? ifncodg.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Infracao)) {
            return false;
        }
        Infracao other = (Infracao) object;
        if ((this.ifncodg == null && other.ifncodg != null) || (this.ifncodg != null && !this.ifncodg.equals(other.ifncodg))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "br.com.sisportaria.view.Infracao[ifncodg=" + ifncodg + "]";
    }

    public void addPropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.addPropertyChangeListener(listener);
    }

    public void removePropertyChangeListener(PropertyChangeListener listener) {
        changeSupport.removePropertyChangeListener(listener);
    }

}
